<?php

namespace App\Http\Requests\Admin;

use App\Http\Requests\Request;

class LinkRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            //
            'lname'=>'required|unique:link',
            'llink'=>'required|unique:link',
        ];
    }

    public function messages()
    {   
        return [
        'lname.required'=>'链接名称必填',
        'lname.unique'=>'连接名称已存在',
        'llink.required'=>'链接地址不能为空',
        'llink.unique'=>'链接地址已存在',
        ];
       
    }
}
